package com.ymttest.database.mapping.godmch;

import com.ymttest.database.model.godmch.funcpackage;
import com.ymttest.database.model.godmch.funcpackageExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;

public interface funcpackageMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @SelectProvider(type=funcpackageSqlProvider.class, method="countByExample")
    int countByExample(funcpackageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @DeleteProvider(type=funcpackageSqlProvider.class, method="deleteByExample")
    int deleteByExample(funcpackageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Delete({
        "delete from funcpackage",
        "where FuncPackageId = #{funcPackageId,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer funcPackageId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Insert({
        "insert into funcpackage (FuncPackageId, FuncType, ",
        "FuncName, PackageAmount, ",
        "ExpirationDay, CreateTime, ",
        "UpdateTime)",
        "values (#{funcPackageId,jdbcType=INTEGER}, #{funcType,jdbcType=INTEGER}, ",
        "#{funcName,jdbcType=VARCHAR}, #{packageAmount,jdbcType=DECIMAL}, ",
        "#{expirationDay,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, ",
        "#{updateTime,jdbcType=TIMESTAMP})"
    })
    int insert(funcpackage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @InsertProvider(type=funcpackageSqlProvider.class, method="insertSelective")
    int insertSelective(funcpackage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @SelectProvider(type=funcpackageSqlProvider.class, method="selectByExample")
    @Results({
        @Result(column="FuncPackageId", property="funcPackageId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="FuncType", property="funcType", jdbcType=JdbcType.INTEGER),
        @Result(column="FuncName", property="funcName", jdbcType=JdbcType.VARCHAR),
        @Result(column="PackageAmount", property="packageAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="IndepPackageAmount", property="indepPackageAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="ExpirationDay", property="expirationDay", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    List<funcpackage> selectByExample(funcpackageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Select({
        "select",
        "FuncPackageId, FuncType, FuncName, PackageAmount, IndepPackageAmount,ExpirationDay, CreateTime, ",
        "UpdateTime",
        "from funcpackage",
        "where FuncPackageId = #{funcPackageId,jdbcType=INTEGER}"
    })
    @Results({
        @Result(column="FuncPackageId", property="funcPackageId", jdbcType=JdbcType.INTEGER, id=true),
        @Result(column="FuncType", property="funcType", jdbcType=JdbcType.INTEGER),
        @Result(column="FuncName", property="funcName", jdbcType=JdbcType.VARCHAR),
        @Result(column="PackageAmount", property="packageAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="IndepPackageAmount", property="indepPackageAmount", jdbcType=JdbcType.DECIMAL),
        @Result(column="ExpirationDay", property="expirationDay", jdbcType=JdbcType.INTEGER),
        @Result(column="CreateTime", property="createTime", jdbcType=JdbcType.TIMESTAMP),
        @Result(column="UpdateTime", property="updateTime", jdbcType=JdbcType.TIMESTAMP)
    })
    funcpackage selectByPrimaryKey(Integer funcPackageId);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=funcpackageSqlProvider.class, method="updateByExampleSelective")
    int updateByExampleSelective(@Param("record") funcpackage record, @Param("example") funcpackageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=funcpackageSqlProvider.class, method="updateByExample")
    int updateByExample(@Param("record") funcpackage record, @Param("example") funcpackageExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @UpdateProvider(type=funcpackageSqlProvider.class, method="updateByPrimaryKeySelective")
    int updateByPrimaryKeySelective(funcpackage record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table funcpackage
     *
     * @mbggenerated Thu Jan 16 11:11:16 CST 2020
     */
    @Update({
        "update funcpackage",
        "set FuncType = #{funcType,jdbcType=INTEGER},",
          "FuncName = #{funcName,jdbcType=VARCHAR},",
          "PackageAmount = #{packageAmount,jdbcType=DECIMAL},",
          "ExpirationDay = #{expirationDay,jdbcType=INTEGER},",
          "CreateTime = #{createTime,jdbcType=TIMESTAMP},",
          "UpdateTime = #{updateTime,jdbcType=TIMESTAMP}",
        "where FuncPackageId = #{funcPackageId,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(funcpackage record);
}